// 成绩操作路由

const express = require("express")
const expressJoi = require('@escook/express-joi');

const router = express.Router()


const { addScore, updateScore, deleteScore, findAll } = require("../controller/score")
const { add_schema, put_schema, delete_schema } = require("../utils/schema/score")

// 新增
router.post("/add", expressJoi(add_schema), addScore)
// 修改
router.put("/update", expressJoi(put_schema), updateScore)
// 删除
router.delete("/delete/:student_id/:course_id", expressJoi(delete_schema), deleteScore)
// 查询
router.post("/list", findAll)

module.exports = router